/**
 * @author Kostya
 */
/**
 * @author Kostya
 */
var iWindow = null;
var iOpener = null;

var WIN_WIDTH = 250;
var WIN_HEIGHT = 150;

 Ext.onReady(function(){
//	Ext.QuickTips.init();	
	iOpener = Ext.air.NativeWindow.getRootHtmlWindow();
	iOpener.iReminderWinReference = window;
	iWindow = window.nativeWindow;
	iWindow.alwaysInFront = true;
	iWindow.visible = true;
	iWindow.width = WIN_WIDTH;
	iWindow.x = air.Screen.mainScreen.bounds.width-WIN_WIDTH-10;
	updateCaption();
	iWindow.height = WIN_HEIGHT;
	iWindow.y = air.Screen.mainScreen.bounds.height-WIN_HEIGHT-30;
//	iWindow.activate();
	
//	lViewport.doLayout();
	setTimeout(function(){
		iWindow.close();
	}, 5000);
	Ext.get('place').on('click', function(){
		iWindow.close();
	});
});

var updateCaption = function(){
	var lResult = iOpener.iNotification;
	document.getElementById('place').innerHTML = lResult;
//	air.trace('height: '+document.getElementById('place').offsetHeight);
	WIN_HEIGHT = document.getElementById('place').offsetHeight+42;
};
